package cnpm.entity;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

@Entity
public class Employee implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "EmployeeID")
	private String employeeID;
	
	@Column(name = "Title")
	private String title;
	
	@Column(name = "FirstName")
	private String firstName;
	
	@Column(name = "LastName")
	private String lastName;
	
	@Column(name = "BirthDate")
	private String birthdate;
	
	@Column(name = "Gender")
	private boolean gender;
	
	@Column(name = "MaritalStatus")
	private boolean maritalStatus;
	
	@Column(name = "NaviteLand")
	private String naviteLand;
	
	@Column(name = "CurrentAddress")
	private String currentAddress;
	
	@Column(name = "IndentityCard")
	private String indentityCard;
	
	@Column(name = "Email")
	private String email;
	
	@Column(name = "Phone")
	private String phone;
	
	@Column(name = "AccountBank")
	private String accountBank;
	
	@Column(name = "Image")
	private String image;
	
	@Column(name = "UpdateDate")
	private String updateDate;
	
	@Column(name = "CreateDate")
	private String createDate;
	
	@Column(name = "UserUpdate")
	private String userUpdate;
	
	@Column(name = "UserCreate")
	private String userCreate;
	
	//Nationality
	@ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.EAGER)
	private Nationality nationality;
	
	//Department
	@ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.EAGER)
	private Department department;
	
	//Bank
	@ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.EAGER)
	private Bank bank;
	
	//BrandBank
	@ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.EAGER)
	private BrandBank brandBank;
	
	//Literacy
	@ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.EAGER)
	private Literacy literacy;
	
	//Office
	@ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.EAGER)
	private Office office;

	public Employee(){}

	public String getEmployeeID() {
		return employeeID;
	}

	public void setEmployeeID(String employeeID) {
		this.employeeID = employeeID;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getBirthdate() {
		return birthdate;
	}

	public void setBirthdate(String birthdate) {
		this.birthdate = birthdate;
	}

	public boolean isGender() {
		return gender;
	}

	public void setGender(boolean gender) {
		this.gender = gender;
	}

	public boolean isMaritalStatus() {
		return maritalStatus;
	}

	public void setMaritalStatus(boolean maritalStatus) {
		this.maritalStatus = maritalStatus;
	}

	public String getNaviteLand() {
		return naviteLand;
	}

	public void setNaviteLand(String naviteLand) {
		this.naviteLand = naviteLand;
	}

	public String getCurrentAddress() {
		return currentAddress;
	}

	public void setCurrentAddress(String currentAddress) {
		this.currentAddress = currentAddress;
	}

	public String getIndentityCard() {
		return indentityCard;
	}

	public void setIndentityCard(String indentityCard) {
		this.indentityCard = indentityCard;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getAccountBank() {
		return accountBank;
	}

	public void setAccountBank(String accountBank) {
		this.accountBank = accountBank;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public Nationality getNationality() {
		return nationality;
	}

	public void setNationality(Nationality nationality) {
		this.nationality = nationality;
	}

	public Department getDepartment() {
		return department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	public Bank getBank() {
		return bank;
	}

	public void setBank(Bank bank) {
		this.bank = bank;
	}

	public BrandBank getBrandBank() {
		return brandBank;
	}

	public void setBrandBank(BrandBank brandBank) {
		this.brandBank = brandBank;
	}

	public Literacy getLiteracy() {
		return literacy;
	}

	public void setLiteracy(Literacy literacy) {
		this.literacy = literacy;
	}

	public Office getOffice() {
		return office;
	}

	public void setOffice(Office office) {
		this.office = office;
	}

	public String getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(String updateDate) {
		this.updateDate = updateDate;
	}

	public String getCreateDate() {
		return createDate;
	}

	public void setCreateDate(String createDate) {
		this.createDate = createDate;
	}

	public String getUserUpdate() {
		return userUpdate;
	}

	public void setUserUpdate(String userUpdate) {
		this.userUpdate = userUpdate;
	}

	public String getUserCreate() {
		return userCreate;
	}

	public void setUserCreate(String userCreate) {
		this.userCreate = userCreate;
	}

	@Override
	public String toString() {
		return "Employee [employeeID=" + employeeID + ", title=" + title
				+ ", firstName=" + firstName + ", lastName=" + lastName
				+ ", birthdate=" + birthdate + ", gender=" + gender
				+ ", maritalStatus=" + maritalStatus + ", naviteLand="
				+ naviteLand + ", currentAddress=" + currentAddress
				+ ", indentityCard=" + indentityCard + ", email=" + email
				+ ", phone=" + phone + ", accountBank=" + accountBank
				+ ", image=" + image + "]";
	}
}
